﻿using System;

namespace DDDSample.Domain.Location
{
    public class Location
    {
        protected Location()
        {
            
        }

        public Location(UnLocode locode, string name)
        {
            UnLocode = locode;
            Name = name;
        }

        public virtual Guid Id { get; protected set; }

        public virtual UnLocode UnLocode { get; protected set; }

        public virtual string Name { get; protected set; }

        public static Location Unknown
        {
            get { return new Location(new UnLocode("XXXXX"), "Unknown location"); }
        }

        public override string ToString()
        {
            return Name + " [" + UnLocode + "]";
        }
    }
}